package net.yyge;

import net.yyge.manifest.editor.AndroidManifest;

public class ManifestEditorTest {

    public static void main(String[] args) {

        //加载根目录 二进制的 AndroidManifest.xml
        AndroidManifest editor = AndroidManifest.loadAXML("temp/AndroidManifest.xml");

//        PermissionTag permission = editor.getPermission();
//        System.out.println( permission);

        editor.setPackage("com.test.package")
                .setCompileSdkVersion(35)
                .setSdkVersion(23,35)
                .addPermission("xxxxx")
                .removePermission("android.permission.WRITE_EXTERNAL_STORAGE")
                .setMainActivity("git.yyge.jshd.activity.WebActivity")
        ;


        //将以上的编辑转换为可读XML字符串
        String editorXML = editor.toXML();
        System.out.println(editorXML);
        //将可读XML转为二进制AXML可用于重新打包APK
//        byte[] axml = editor.toAXML(editorXML);

        //do....
    }


}
